load("//bazel:skia_rules.bzl", "exports_files_legacy", "skia_cc_deps", "skia_filegroup")

package(
    default_applicable_licenses = ["//:license"],
)

licenses(["notice"])

exports_files_legacy()

skia_filegroup(
    name = "srcs",
    testonly = True,
    srcs = [
        "Window_unix.cpp",
        "Window_unix.h",
        "keysym2ucs.c",
        "keysym2ucs.h",
        "main_unix.cpp",
    ],
    visibility = ["//tools/sk_app:__pkg__"],
)

skia_cc_deps(
    name = "deps",
    testonly = True,
    linkopts = [
        "-lX11",
        "-lxcb",  # dep of X11
        "-lXau",  # dep of xcb
        "-lXdmcp",  # dep of xcb
    ] + select({
        "//src/gpu:vulkan_ganesh": ["-lX11-xcb"],
        "//conditions:default": [],
    }),
    visibility = ["//tools/sk_app:__pkg__"],
    deps = select({
        "//src/gpu:vulkan_ganesh": ["//tools/gpu/vk:testutils"],
        "//conditions:default": [],
    }),
)
